95ede81388869b0175c2aa409375131c300b0a1b,exercises/palindrome-products/src/test/java/PalindromesTest.java,PalindromesTest,largestPalindromeFromTripleDigitFactors,#,105
Before Change
);
final long expectedValue = 906609l;
final SortedMap<Long, List<List<Integer>>> palindromes
= Palindromes.getPalindromeSortedListBuilder()
.withFactorsLessThanOrEqualTo(999)
.withFactorsGreaterThanOrEqualTo(100)
.build();
assertNotNull(palindromes);
assertFalse(palindromes.isEmpty());
long actualValue = palindromes.lastKey();
assertEquals(expectedValue, actualValue);
List<List<Integer>> actual = palindromes
.get(palindromes.lastKey())
.stream()
.sorted((a, b) -> Integer.compare(a.get(0), b.get(0)))
.collect(Collectors.toList());
assertEquals(expected, actual);
}
After Change
);
final long expectedValue = 906609l;
final SortedMap<Long, List<List<Integer>>> palindromes = Palindromes.getPalindromeProductsWithFactors(100, 999);
checkPalindromeWithFactorsMatchesExpected(expected, expectedValue, palindromes, palindromes.lastKey());
}
@Test